package com.poi;

import java.io.File;
import java.util.List;

import org.aeonbits.owner.ConfigFactory;

import com.poi.entity.ExportRunnable;
import com.poi.entity.PathConfig;
import com.poi.util.LeadHandlerUtil;

public class ExcelToSql {

	
	
	public static void main(String[] args) {
		PathConfig cfg = ConfigFactory.create(PathConfig.class);
		List<File> files = LeadHandlerUtil.getXlsFiles(cfg.xlsPath(), cfg.outPath());
		if(files !=null && files.size() !=0){
			for(File subFile:files){
				new Thread(new ExportRunnable(subFile,cfg.outPath(),cfg.tablePrefixCn())).start();
			}
		}
	}
}
